﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DFGK_WMS.Context.Migrations
{
    public partial class 库存快照 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "t_InventoryDay",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    WarehouseId = table.Column<long>(type: "bigint", nullable: true),
                    WarehouseCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    WarehouseName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    AreaId = table.Column<long>(type: "bigint", nullable: true),
                    AreaCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    AreaName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    LocationId = table.Column<long>(type: "bigint", nullable: true),
                    LocationCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    LocationDepth = table.Column<int>(type: "int", nullable: false),
                    LocationLineNo = table.Column<int>(type: "int", nullable: false),
                    LocationLayerNo = table.Column<int>(type: "int", nullable: false),
                    LocationColumnNo = table.Column<int>(type: "int", nullable: false),
                    LocationName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    LocationHeightType = table.Column<int>(type: "int", nullable: true),
                    Status = table.Column<int>(type: "int", nullable: true),
                    PalletBarcode = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    RelatedOrderDetailId = table.Column<long>(type: "bigint", nullable: true),
                    BillType = table.Column<int>(type: "int", nullable: true),
                    IsLock = table.Column<bool>(type: "bit", nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    MaterialId = table.Column<long>(type: "bigint", nullable: true),
                    MaterialCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    MaterialName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    Articlebarcode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    HasSkuDetail = table.Column<bool>(type: "bit", nullable: false),
                    AvailableQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    AllocateQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    PutawayQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    PickedQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    UnitId = table.Column<long>(type: "bigint", nullable: true),
                    UnitName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PackQty = table.Column<int>(type: "int", nullable: true),
                    MaterialKeyId = table.Column<long>(type: "bigint", nullable: true),
                    InStockDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    QualityState = table.Column<int>(type: "int", nullable: true),
                    BatchNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExpireDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ProductDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    SupplierId = table.Column<long>(type: "bigint", nullable: true),
                    SupplierName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    CustomerId = table.Column<long>(type: "bigint", nullable: true),
                    CustomerName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    MaterialTypeId = table.Column<long>(type: "bigint", nullable: true),
                    MaterialTypeCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    MaterialTypeName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    ProduceFactory = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    OutFactoryDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Qadate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ErplocationCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RoutewayId = table.Column<long>(type: "bigint", nullable: true),
                    StackingStorageId = table.Column<long>(type: "bigint", nullable: true),
                    DeptCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeptName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BusinessType = table.Column<int>(type: "int", nullable: false),
                    LocationDistanceValue = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    LogicalPartCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RealHeightType = table.Column<int>(type: "int", nullable: true),
                    DisOrderNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DisOrderLineNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    InStockShortDate = table.Column<int>(type: "int", nullable: true),
                    WoodPalletBarcode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PurOrderNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PurOrderLineNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PurOrderLineType = table.Column<int>(type: "int", nullable: true),
                    IsMultPallet = table.Column<bool>(type: "bit", nullable: true),
                    MultPalletId = table.Column<int>(type: "int", nullable: true),
                    TotalPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    MaterialCategoryId = table.Column<int>(type: "int", nullable: true),
                    MaterialCategoryName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BatchNoExplain = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Price = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    ParentPalletBarcode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    InventoryAlert = table.Column<int>(type: "int", nullable: false),
                    WhetherQualified = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateUserId = table.Column<long>(type: "bigint", nullable: false),
                    CreateUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ModifyUserId = table.Column<long>(type: "bigint", nullable: false),
                    ModifyUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    ModifyDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsDel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_InventoryDay", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "t_InventoryDay");
        }
    }
}
